Optimal. Leaf size=47 \[ \frac{-B+i A}{2 d (a+i a \tan (c+d x))}+\frac{x (A-i B)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0427031, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {3526, 8} \[ \frac{-B+i A}{2 d (a+i a \tan (c+d x))}+\frac{x (A-i B)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3526
Rule 8
Rubi steps
\begin{align*} \int \frac{A+B \tan (c+d x)}{a+i a \tan (c+d x)} \, dx &=\frac{i A-B}{2 d (a+i a \tan (c+d x))}+\frac{(A-i B) \int 1 \, dx}{2 a}\\ &=\frac{(A-i B) x}{2 a}+\frac{i A-B}{2 d (a+i a \tan (c+d x))}\\ \end{align*}
Mathematica [B] time = 0.452348, size = 102, normalized size = 2.17 \[ \frac{\cos (c+d x) (A+B \tan (c+d x)) ((A (2 d x-i)-2 i B d x+B) \tan (c+d x)-2 i A d x+A+B (-2 d x+i))}{4 a d (\tan (c+d x)-i) (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.027, size = 121, normalized size = 2.6 \begin{align*}{\frac{A}{2\,ad \left ( \tan \left ( dx+c \right ) -i \right ) }}+{\frac{{\frac{i}{2}}B}{ad \left ( \tan \left ( dx+c \right ) -i \right ) }}-{\frac{{\frac{i}{4}}\ln \left ( \tan \left ( dx+c \right ) -i \right ) A}{ad}}-{\frac{\ln \left ( \tan \left ( dx+c \right ) -i \right ) B}{4\,ad}}+{\frac{B\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{4\,ad}}+{\frac{{\frac{i}{4}}A\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{ad}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.39061, size = 108, normalized size = 2.3 \begin{align*} \frac{{\left (2 \,{\left (A - i \, B\right )} d x e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A - B\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.43027, size = 88, normalized size = 1.87 \begin{align*} \begin{cases} \frac{\left (i A - B\right ) e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text{for}\: 4 a d e^{2 i c} \neq 0 \\x \left (- \frac{A - i B}{2 a} + \frac{\left (A e^{2 i c} + A - i B e^{2 i c} + i B\right ) e^{- 2 i c}}{2 a}\right ) & \text{otherwise} \end{cases} + \frac{x \left (A - i B\right )}{2 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.42467, size = 115, normalized size = 2.45 \begin{align*} -\frac{\frac{{\left (i \, A + B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac{{\left (-i \, A - B\right )} \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a} + \frac{-i \, A \tan \left (d x + c\right ) - B \tan \left (d x + c\right ) - 3 \, A - i \, B}{a{\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]